/****

    activequant - activestocks.eu

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

	
	contact  : contact@activestocks.eu
    homepage : http://www.activestocks.eu

****/
package org.activequant.dao.util;

import org.activequant.core.domainmodel.data.Candle;
import org.activequant.dao.ICandleDao;
import org.activequant.dao.ISpecificationDao;

/**
 * Wrapper for Candle Dao that checks if the data is already in the database. If so, does nothing. If not, inserts.
 * This allows one to download and put into the database intersecting time intervals of
 * market data: the intersecting part will not be re-inserted. Note that normally an attempt to
 * insert something that is already in the database produces database exception due to the
 * violated unique key constraint.<br/>
 * A LookupDecorator&lt;Candle&gt; subclass. Implements the ICandleDao interface.
 * <p>
 * <b>History:</b><br>
 *  - [24.10.2007] Created (Erik Nijkamp)<br>
 *  - [12.01.2008] JavaDocs added (Mike Kroutikov)<br>
 *
 *  @author Erik Nijkamp
 */
public class CandleLookupDecorator extends LookupDecorator<Candle> implements ICandleDao {
	/**
	 * constructs a CandleLookupDecorator(extends LookupDecorator&lt;Candle&gt; implements ICandleDao) using <code>Candle.class</code> and the given decoree(ICandleDao)
	 * and spec(ISpecificationDao) to set its associated clazz(Class&lt;T&gt;), decoree(IMarketDataEntityDao&lt;T&gt;) and spec(ISpecificationDao)
	 * @param decoree
	 * @param spec
	 */
	public CandleLookupDecorator(ICandleDao decoree, ISpecificationDao spec) {
		super(Candle.class, decoree, spec);
	}

}
